﻿@model IEnumerable<AuditModel.Score>

@{
    ViewBag.Title = AuditResources.UI.PageTitle;
    Layout = "~/Views/Shared/ExpertJudge/_ExpertJudgeLayout.cshtml";
    var grid = new WebGrid(Model, defaultSort: "TotalScore");
    grid.SortDirection = SortDirection.Descending;
}

<h2>@AuditResources.Score.ObjectName</h2>

<fieldset>
<legend>开始新的评分</legend>
@using (Html.BeginForm("Score","PW",FormMethod.Get))
{
    <div class="editor-label">参赛编号</div>
    <div class="editor-field">@Html.TextBox("id")</div>
    <input type="submit" value="开始" />@ViewBag.ErrorMsg@Html.Hidden("returnaction","MyScores") 
     <text>|</text>
     @Html.ActionLink("记不得档案编号，想查找参赛档案开始评分", "Archives", "PW", null, new { @class = "button" })
}
</fieldset>
<fieldset>
<legend>已评分情况</legend>
@grid.GetHtml(
        columns: grid.Columns(
                        grid.Column("ArchiveID", AuditResources.Score.Archive),
                        grid.Column("Archive.TeacherName", AuditResources.Archive.TeacherName),
                        grid.Column("Archive.County.Name", AuditResources.County.ObjectName),
                        grid.Column("MaterialScore", AuditResources.Score.MaterialScore),
                        grid.Column("InstructionScore", AuditResources.Score.InstructionScore),
                        grid.Column("DefenseScore", AuditResources.Score.DefenseScore),
                        grid.Column("OtherScore", AuditResources.Score.OtherScore),
                        grid.Column("TotalScore", "总分"),
                            grid.Column("Submittime", AuditResources.Score.SubmitTime, format: @<text>@string.Format("{0:d}", item.Submittime)</text>),
                                                    grid.Column(string.Empty, "可评分日期范围", format: @<text>@(string.Format("{0:d}~{1:d}", item.Archive.EvaluationStartDate, item.Archive.EvaluationDueDate))</text>),
                                                grid.Column("UserId", string.Empty, format: @<text>@((DateTime.Now >= item.Archive.EvaluationStartDate && DateTime.Now.Date <= item.Archive.EvaluationDueDate)?Html.ActionLink("修改" + AuditResources.UI.ScoreAction, "Score", new { id = item.ArchiveID, returnaction = "MyScores" }, new { @class = "button" }):new MvcHtmlString(""))</text>)
                        ))


</fieldset>
